package com.example.alee.ALeeSpringWeb.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;


@RestController
public class HelloController {


    private final Date date;

    public HelloController(Date date) {
        this.date = date;
    }

    @RequestMapping("/hello")
    public String hello() {
        return "Hello, Spring Boot 2!" + date;
    }


    @PostMapping("/user")
    public String user() {
        return "Hello Word...";
    }
}
